
var order = require("../models/order");

updateOrder = function (out_trade_no,data) {
    return new Promise((resolve, reject) => {
        order.update({out_trade_no: out_trade_no},{$set: {wxPayNotify: data, ifPay: true}},(err,docs) => {
            if (err) reject(err)
            else resolve(docs)
        })
    })
}

module.exports = updateOrder